<?php

namespace App\model;

use Illuminate\Database\Eloquent\Model;

/**
 * App\ParkArea
 *
 * @property int $id
 * @property string|null $value
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\ParkArea whereArea($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\ParkArea whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\ParkArea whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\ParkArea whereUpdatedAt($value)
 * @mixin \Eloquent
 * @method static \Illuminate\Database\Eloquent\Builder|\App\ParkArea whereValue($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\ParkArea newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\ParkArea newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\ParkArea query()
 */
class ParkArea extends Model
{//园区面积
    protected $table='park_area';
    public static function getSelectOptions()
    {
        $options = \DB::table('park_area')->select('id','value as text')->get();
        $selectOption = [];
        foreach ($options as $option){
            $selectOption[$option->id] = $option->text;
        }
        return $selectOption;
    }
}
